<html>
	<head>
		<title>Welcome to Grails</title>
		<meta name="layout" content="main" />
		<style type="text/css" media="screen">

			#nav {
				margin-top:20px;
				margin-left:30px;
				width:228px;
				float:left;

			}
			.homePagePanel * {
				margin:0px;
			}
			.homePagePanel .panelBody ul {
				list-style-type:none;
				margin-bottom:10px;
			}
			.homePagePanel .panelBody h1 {
				text-transform:uppercase;
				font-size:1.1em;
				margin-bottom:10px;
			}
			.homePagePanel .panelBody {
				background: url(images/leftnav_midstretch.png) repeat-y top;
				margin:0px;
				padding:15px;
			}
			.homePagePanel .panelBtm {
				background: url(images/leftnav_btm.png) no-repeat top;
				height:20px;
				margin:0px;
			}

			.homePagePanel .panelTop {
				background: url(images/leftnav_top.png) no-repeat top;
				height:11px;
				margin:0px;
			}
			h2 {
				margin-top:15px;
				margin-bottom:15px;
				font-size:1.2em;
			}
			#pageBody {
				margin-left:280px;
				margin-right:20px;
				margin-bottom:20px;
				font-size: 12px;
			}
		</style>
	</head>
	<body>
		<div id="nav">
			<div class="homePagePanel">
				<div class="panelTop">

				</div>
				<div class="panelBody">
					<h1>Application Status</h1>
					<ul>
						<li>App version: <g:meta name="app.version"></g:meta></li>
						<li>Grails version: <g:meta name="app.grails.version"></g:meta></li>
						<li>JVM version: ${System.getProperty('java.version')}</li>
						<li>Controllers: ${grailsApplication.controllerClasses.size()}</li>
						<li>Domains: ${grailsApplication.domainClasses.size()}</li>
						<li>Services: ${grailsApplication.serviceClasses.size()}</li>
						<li>Tag Libraries: ${grailsApplication.tagLibClasses.size()}</li>
					</ul>
					<h1>Installed Plugins</h1>
					<ul>
						<g:set var="pluginManager"
							   value="${applicationContext.getBean('pluginManager')}"></g:set>

						<g:each var="plugin" in="${pluginManager.allPlugins}">
							<li>${plugin.name} - ${plugin.version}</li>
						</g:each>

					</ul>
				</div>
				<div class="panelBtm">
				</div>
			</div>


		</div>
		<div id="pageBody">
			<h1>菜单树的实践参考</h1>
			<p>主要的目的是想用database存menu的資訊產生ul li 這種結講。</p>
			<p>详细的文档请参考 <a href="https://code.google.com/p/grails-templar/wiki/ProjectOutline">Grails-Templar</a> 的 <a href="https://code.google.com/p/grails-templar/wiki/naviMenu">wiki页</a>。

			<h2>使用template的例子</h2>
			<p>使用代码如下：</p>
			<pre class="code">${"""
	<div class="menu">
		<g:render template="/menuTemplate" model="[root:templar.Menu.findByParentIsNull()]" />
	</div>
			""".encodeAsHTML()}</pre>
			<g:link controller="demo" action="templateDemo" target="_blank">打开示例页</g:link>

			<h2>使用taglib的例子</h2>
			<p>使用代码如下：</p>
			<pre class="code">
	&lt;div class=&quot;menu&quot;&gt;
		&lt;g:menu root=&quot;$ {templar.Menu.findByParentIsNull()}&quot; /&gt;
	&lt;/div&gt;</pre>
			<g:link controller="demo" action="taglibDemo" target="_blank">打开示例页</g:link>
			
			<h2>使用jquery mb.menu 实现的动态菜单示例 </h2>
			<a href="demo">打开示例页</a>。
			<p>jquery mb.menu的网址：<a href="http://pupunzi.open-lab.com/mb-jquery-components/mb-_menu/">http://pupunzi.open-lab.com/mb-jquery-components/mb-_menu/</a>
			</p>
		</div>
	</body>
</html>